home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / util / boot / mkick19.lha / SwitchScript.doc < prev   
Text File  |  1995-01-01  |  4KB  |  112 lines

  1.  
  2.                           Startup Script Switcher 2.0
  3.  
  4.                  (c) 1993 Martin Mares, MJSoft System Software
  5.  
  6. ==============================================================================
  7.  
  8.  
  9. Introduction
  10. ------------
  11.  
  12.    Some months ago, I wrote a small utility called SwitchScript, which was
  13. able to execute scripts named S:Startup.xxxxx, where xxxxx was the version
  14. of currently running Kickstart. This utility was very useful, but had many
  15. disadvantages (when a registered developer upgraded his 39.110 to 39.115, he
  16. had to rename or copy his startup script ...). It's the reason why I have
  17. written another small utility named SwitchScript 2.0.
  18.  
  19.    See README for copyright and additional information.
  20.  
  21.  
  22. Usage
  23. -----
  24.  
  25.    SwitchScript is completely command-line controlled. But if you don't want
  26. to do anything with these mysteriously-named parameters, you can just say:
  27.  
  28.           SwitchScript
  29.  
  30.    In this case, SwitchScript will behave similarly to its older version.
  31. It will simply execute a script named S:Startup-vv, where vv is version number
  32. of Kickstart you are currently using.
  33.  
  34.    If you use SwitchScript 1.0 and you want to use your old scripts with
  35. new SwitchScript, you should use:
  36.  
  37.           SwitchScript *=S:Startup.%v%r
  38.  
  39.    But there are many other methods how to switch the scripts... They may be
  40. specified using the parameter line. This line consists of definition fields
  41. separated by spaces. Each field has the following form:
  42.  
  43.           <version>=<script name>
  44.  
  45.    Where  <version>  is Kickstart version pattern consisting of digits and/or an
  46. asterisk  sign  ("*"),  which  means  "any  number of any digits".  For example:
  47. 34005  is  equivalent  to  Kickstart  version  34.5 (the old 1.3), 39* means any
  48. Kickstart with version 39 (3.0) and * matches all Kickstart versions.
  49.  
  50.    <script name> is a name of script executed if we're using specified Kickstart.
  51. If this name doesn't contain a path (it means it doesn't have any ':' or '/'
  52. in it), 'S:Startup-' is inserted before it. Any '%v' is replaced by Kickstart
  53. version (two digits) and '%r' is replaced by Kickstart revision (three digits).
  54. (If we're using KS 34.5, %v%rx will expand to S:Startup-34005x, S:St-%v to
  55. S:St-34 etc.)
  56.  
  57.    If there is no matching version pattern, the standard script (S:Startup-%v%r)
  58. will be executed.
  59.  
  60.  
  61.     Example:  SwitchScript 34005=WB13:S/Startup-sequence 3911*=beta
  62.  
  63.       It will execute WB13:S/Startup-sequence in case we're using KS 1.3
  64.                       S:Startup-beta on condition we're using KS 39.110,39.115...
  65.                       S:Startup-37 if we're using 37.175
  66.                       S:Startup-39 if we're using 39.106
  67.                       S:Startup-40 if we're using 40.055
  68.                       ...
  69.  
  70.    If you use Kickstart 1.X, SwitchScript requires C:Run (standard command).
  71.  
  72.    Warning: Scripts started by SwitchScript must not contain any conditional
  73. processing, because SwitchScript uses slightly faster method of their execution,
  74. which doesn't support conditionals.
  75.  
  76.    Technical note: SwitchScript uses Execute("",Open(script,MODE_OLDFILE),
  77. Output()). If you have an idea how to do it better, let me know.
  78.  
  79.  
  80. Return codes
  81. ------------
  82.  
  83.    Because I'm very lazy and I tried to make this program small, SwitchScript
  84. displays NO error messages. All kinds of errors are signalized by different
  85. return codes:
  86.  
  87.     0 - everything is OK
  88.    20 - startup script failed / C:Run not present
  89.    21 - command-line syntax error
  90.    22 - script name too long (maximum is 63 characters)
  91.    23 - startup script not found
  92.  
  93.  
  94. Installation
  95. ------------
  96.  
  97.    First create the startup scripts for all the Kickstarts used. These scripts
  98. have to contain no final EndCLI statements.
  99.  
  100.    Copy SwitchScript to your C: directory and replace your
  101. Startup-sequence by following text:
  102.  
  103. MKick                               (or SKick if you have 2.0 or higher)
  104. SwitchScript
  105. EndCLI
  106.  
  107.  
  108. Final words
  109. -----------
  110.  
  111.    Send all suggestions, comments and bug reports to mj@k332.feld.cvut.cz.
  112.